home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmiSoft / Util / libs / ExtraLib.lha / Extra / Demos / AlertDemo.ASM next >
Assembly Source File  |  2004-05-30  |  4KB  |  101 lines

  1. ; ___________________________________________________________________________
  2. ; |*************************************************************************|
  3. ; |*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|
  4. ; |*| Set TAB to 15 for best readable file layout. |*| HiSoft DevPac 3.04 |*|
  5. ; |*|______________________________________________|*|____________________|*|
  6. ; |*************************************************************************|
  7. ; |*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|*|
  8. ; |*|               |*|  $Id: AlertDemo.ASM (07.10.03)                    |*|
  9. ; |*| ###### ###### |*|  RhoSigma Source based on NDK 3.1 Includes 40.15  |*|
  10. ; |*| ##  ## ##   # |*| _________________________________________________ |*|
  11. ; |*| ##  ##  ##    |*|                                                   |*|
  12. ; |*| ######   ##   |*|  Demo to show use of DATEXT-Macro (settings.i)    |*|
  13. ; |*| ##      ##    |*|                                                   |*|
  14. ; |*| ##     ##   # |*| ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ |*|
  15. ; |*| ##     ###### |*|  Copyright © 1998-2002 RhoSigma, Roland Heyder    |*|
  16. ; |*|               |*|  All Rights Reserved.                             |*|
  17. ; |*|_______________|*|___________________________________________________|*|
  18. ; |*************************************************************************|
  19. ; ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  20.  
  21. ; ACHTUNG: Die Macros zum Aufruf der OS-Funktionen, welche in dieser Source
  22. ; ¯¯¯¯¯¯¯¯ verwendet werden, entsprechen nicht denen, die in den offiziellen
  23. ;          Includes in den entsprechenden _lib.i Dateien definiert sind.
  24. ;           Vielmehr habe ich hierfür mein eigenes Macro entwickelt. Dieses
  25. ;          Macro ist im Kontext für alle Libraries identisch und entspicht
  26. ;          dem, welches in dem Include »extra_lib.i« für die mitgelieferte
  27. ;          »extra.library« definiert ist !!
  28.  
  29.     OPT    P=68000,NODEBUG,AMIGA
  30.     OPT    O1+,O2+,O3+,O4+,O5+,O6+,O7+,O10+,O11+
  31.     OPT    CHKBIT,CHKIMM,TYPE,USER
  32.     OUTPUT    AlertDemoASM
  33.  
  34.     INCDIR    Include:
  35.     INCLUDE    lvo/exec_lib.i
  36.     INCLUDE    lvo/intuition_lib.i
  37.     INCLUDE    rhosigma/settings.i
  38.  
  39.     jmp    SysStart
  40.  
  41.     dc.b    "$VER: AlertDemoASM 4.215 (07.10.03)",13,10,0
  42.     dc.w    0
  43.  
  44. SysStart    lea    IntuName(pc),a1        ; intuition öffnen
  45.     moveq    #33,d0
  46.     DOEXEC    OpenLibrary
  47.     move.l    d0,_IntuitionBase
  48.     beq.s    .error            ; Öffnen fehlgeschlagen
  49.  
  50.     lea    AlertTxt1(pc),a0       ; DisplayAlert ausführen
  51.     moveq    #0,d0
  52.     moveq    #40,d1
  53.     DOINT    DisplayAlert
  54.  
  55.     lea    AlertTxt2(pc),a0       ; DisplayAlert ausführen
  56.     moveq    #0,d0
  57.     moveq    #20,d1
  58.     DOINT    DisplayAlert,OK
  59.  
  60.     lea    AlertTxt3(pc),a0       ; DisplayAlert ausführen
  61.     moveq    #0,d0
  62.     moveq    #50,d1
  63.     DOINT    DisplayAlert,OK
  64.  
  65.     lea    AlertTxt4(pc),a0       ; DisplayAlert ausführen
  66.     moveq    #0,d0
  67.     moveq    #30,d1
  68.     DOINT    DisplayAlert,OK
  69.  
  70.     movea.l    _IntuitionBase(pc),a1  ; intuition schließen
  71.     DOEXEC    CloseLibrary
  72.     moveq    #0,d0    ; kein CLI-Fehler (Programmende)
  73.     bra.s    .exit
  74.  
  75. .error    moveq    #20,d0    ; CLI-Rückgabe FAIL (keine intuition)
  76. .exit    rts
  77.  
  78. IntuName    dc.b    "intuition.library",0
  79. _IntuitionBase    dc.l    0
  80.  
  81. AlertTxt1    DATEXT    100,12,<linke Seite>    ; kein END-Flag, absolute
  82.     DATEXT    444,12,<rechte Seite>   ; X-Koordinaten
  83.     DATEXT    DATPOS_C,22,<zentriert> ; kein END-Flag, zentriert
  84.     DATEXT    DATPOS_C,32,<Ende>,END  ; END-Flag, zentriert
  85.  
  86. AlertTxt2    DATEXT    112,12,<Oder>
  87.     DATEXT    212,12,<alles>
  88.     DATEXT    312,12,<in>
  89.     DATEXT    412,12,<einer>
  90.     DATEXT    512,12,<Zeile !!>,END
  91.  
  92. AlertTxt3    DATEXT    DATPOS_C,12,<Oder>
  93.     DATEXT    DATPOS_C,22,<alles>
  94.     DATEXT    DATPOS_C,32,<zentriert>
  95.     DATEXT    DATPOS_C,42,<!!>,END
  96.  
  97. AlertTxt4    DATEXT    DATPOS_L,12,<linksbündig>
  98.     DATEXT    DATPOS_C,12,<zentriert>
  99.     DATEXT    DATPOS_R,12,<rechtsbündig>
  100.     DATEXT    200,22,<absolute X-Pos 200 v.l.>,END
  101.